package com.acwing.partition13;

import java.io.*;
import java.math.BigDecimal;
import java.util.Arrays;

/**
 * @author `RKC`
 * @date 2022/3/4 8:50
 */
public class AC1235付账问题 {

    private static final int N = 500010;
    private static int[] a = new int[N];
    private static int n;
    private static double s;

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    private static final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        String[] ss = reader.readLine().split(" ");
        n = Integer.parseInt(ss[0]);
        s = Double.parseDouble(ss[1]);
        ss = reader.readLine().split(" ");
        for (int i = 0; i < n; i++) a[i] = Integer.parseInt(ss[i]);
        Arrays.sort(a, 0, n);
        BigDecimal ans = new BigDecimal("0");
        //每个人本应付的平均值的钱
        double avg = s / n;
        for (int i = 0; i < n; i++) {
            //当前这个人应该付的钱数
            double cur = s / (n - i);
            if (cur > a[i]) cur = a[i];
//            ans += (cur - avg) * (cur - avg);
            ans = ans.add(new BigDecimal(cur - avg).multiply(new BigDecimal(cur - avg)));
            s -= cur;
        }
        writer.write(String.format("%.4f\n", Math.sqrt(ans.doubleValue() / n)));
        writer.flush();
    }
}
